package com.boot2.core.dict;

/**
 * @author zhangweilin
 * @description: 操作系统类型
 * @date 2017年12月28日 下午7:23:49
 */
public class OsEnum {


    public static enum Type {
        /**
         * 操作系统类型
         */
        android(0, "android"), ios(1, "ios"), window(3, "window"), linux(4, "linux"), macosx(5, "macosx"),;

        private int index;
        private String name;

        Type(int index, String name) {
            this.index = index;
            this.name = name;
        }

        public static String getName(int index) {
            for (Type c : Type.values()) {
                if (c.getIndex() == index) {
                    return c.name;
                }
            }
            return null;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getIndex() {
            return index;
        }

        public void setIndex(int index) {
            this.index = index;
        }
    }
}
